//
// Created by 陈成 on 2020/2/11.
//

#include "CpuTop.h"

CpuTop::CpuTop(sc_module_name name) : sc_module(name) {
    _if = new InstFetcher("InstFetcher");
    _id = new InstDecoder("InstDecoder");
    _ie = new InstExer("InstExer");

    _if->initiator_socket(_id->target_socket);
    _id->initiator_socket(_ie->target_socket);
}

CpuTop::~CpuTop() {
    if (_if) delete _if;
    if (_id) delete _id;
    if (_ie) delete _ie;
}
